package top.chenyaohua.nginx.clojure;

import nginx.clojure.java.NginxJavaRingHandler;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.IOException;
import java.util.Map;

/**
 * 初始化容器
 *
 */
public class NginxClojureInitHandler implements NginxJavaRingHandler {

    private  static AnnotationConfigApplicationContext ANNOTATION_CONFIG_APPLICATION_CONTEXT;

    static {
        ANNOTATION_CONFIG_APPLICATION_CONTEXT = new AnnotationConfigApplicationContext("top.chenyaohua.nginx.clojure");
    }

    @Override
    public Object[] invoke(Map<String, Object> map) throws IOException {

        return null;
    }


    public static  Object getBean(String tClass){

        return ANNOTATION_CONFIG_APPLICATION_CONTEXT.getBean(tClass);
    }

/*    public static void main(String[] args) {
        Object bean = getBean("routerService");
        System.out.println(bean);
    }*/
}
